home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
samilog.lha
/
SAmiLog
/
Docs
/
Storage.DOC
< prev
Wrap
Text File
|
1993-08-11
|
10KB
|
197 lines
*****************************************************************************
* Super-AmiLog Storage File Format (v002 - for SAmiLog v2.00) *
* There are some examples at the end of the file. They are in ASM, but are *
* VERY simple so they should be usefull to anyone really (except REXX haha) *
* Sorry that it's all Rs-Tables, that's how I use it, change it to whatever *
* form you want. *
*****************************************************************************
* I thought of putting some kind of checksum onto the data, but I guess it *
* would be easy enough for a lame-sysop to fake the calleslog to give him *
* some high-records. (Easier than hex-editing the storage file). *
*****************************************************************************
* NOTE: All DATES are longwords containing the number of days since 1978, *
* ----- which you can convert into a string with DateToStr() in dos.library *
*****************************************************************************
*****************************************************************************
*****************************************************************************
* BELOW is the actual storage file structure. *
*****************************************************************************
;===========================================================================;
StorFil Equ __RS ;------- Storage File Memory -------;
;===========================================================================;
SV_Start Rs.b S_Vers_Len File Version
SX_Clear_Date Rs.l 1 Date that the file was cleared/made.
SX_RESERVED Rs.b 36 36 CHARS RESERVED FOR ENHANCEMENTS
;---------------------------------------------------------------------------;
;- Daily Stats Structures [8] ----------------------------------------------;
;---------------------------------------------------------------------------;
SD0_Base Rs.b SD_Len Day #0 (Today)
SD1_Base Rs.b SD_Len Day #1 -.
SD2_Base Rs.b SD_Len Day #2 |
SD3_Base Rs.b SD_Len Day #3 |
SD4_Base Rs.b SD_Len Day #4 |- One Full Week.
SD5_Base Rs.b SD_Len Day #5 |
SD6_Base Rs.b SD_Len Day #6 |
SD7_Base Rs.b SD_Len Day #7 -'
;---------------------------------------------------------------------------;
;- Records Structure -------------------------------------------------------;
;---------------------------------------------------------------------------;
SR_Calls Rs.w 1 Callers
SR_Calls_D Rs.l 1 Date of Above
SR_UpKBytes Rs.l 1 KBytes Uploaded
SR_UpKBytes_D Rs.l 1 Date of Above
SR_UpFiles Rs.w 1 Files Uploaded
SR_UpFiles_D Rs.l 1 Date of Above
SR_UpFails Rs.w 1 Upload Fails (Not Implemented)
SR_UpFails_D Rs.l 1 Date of Above (Not Implemented)
SR_DnKBytes Rs.l 1 KBytes Downloaded
SR_DnKBytes_D Rs.l 1 Date of Above
SR_DnFiles Rs.w 1 Files Downloaded
SR_DnFiles_D Rs.l 1 Date of Above
SR_DnFails Rs.w 1 Download Fails (Not Implemented)
SR_DnFails_D Rs.l 1 Date of Above (Not Implemented)
SR_UsedMins Rs.l 1 Minutes Of Useage
SR_UsedMins_D Rs.l 1 Date of Above
SR_NewUsers Rs.w 1 New Users
SR_NewUsers_D Rs.l 1 Date of Above
SR_Hacks Rs.w 1 Hacks
SR_Hacks_D Rs.l 1 Date of Above
SR_Drops Rs.w 1 Drop Carriers
SR_Drops_D Rs.l 1 Date of Above
SR_Pages Rs.w 1 Pages
SR_Pages_D Rs.l 1 Date of Above
SR_RESERVED Rs.b 40 40 CHARS RESERVED FOR ENHANCEMENTS
SR_Len Equ __RS-SR_Calls Length
;---------------------------------------------------------------------------;
;- Individual User Entries [20] --------------------------------------------;
;---------------------------------------------------------------------------;
SU01_Base Rs.b SU_Len User #1
SU02_Base Rs.b SU_Len User #2
SU03_Base Rs.b SU_Len User #3
SU04_Base Rs.b SU_Len User #4
SU05_Base Rs.b SU_Len User #5
SU06_Base Rs.b SU_Len User #6
SU07_Base Rs.b SU_Len User #7
SU08_Base Rs.b SU_Len User #8
SU09_Base Rs.b SU_Len User #9
SU10_Base Rs.b SU_Len User #10
SU11_Base Rs.b SU_Len User #11
SU12_Base Rs.b SU_Len User #12
SU13_Base Rs.b SU_Len User #13
SU14_Base Rs.b SU_Len User #14
SU15_Base Rs.b SU_Len User #15
SU16_Base Rs.b SU_Len User #16
SU17_Base Rs.b SU_Len User #17
SU18_Base Rs.b SU_Len User #18
SU19_Base Rs.b SU_Len User #19
SU20_Base Rs.b SU_Len User #20
;---------------------------------------------------------------------------;
S_Size Equ __RS-StorFil Size of Storage File.
*****************************************************************************
*****************************************************************************
*****************************************************************************
* Below are equates etc used in the above structure *
*****************************************************************************
S_Vers Dc.b "*SALv002" File Version (At Start)
;;;;;;;;;;;;;;; This is *NOT* the version of SAmiLog it is for, but the
;;;;;;;;;;;;;;; version of the Storage File itself. If, in a future update
;;;;;;;;;;;;;;; (Say 2.10) I alter the format, it will be "*SALv003".
S_Vers_Len Equ *-S_Vers
;---------------------------------------------------------------------------;
;- Daily Statistics in Storage File ----------------------------------------;
;---------------------------------------------------------------------------;
RSReset
SD_Date Rs.l 1 Date (Days Since 1978)
SD_Calls Rs.w 1 Callers
SD_UpKBytes Rs.l 1 KBytes Uploaded
SD_UpFiles Rs.w 1 Files Uploaded
SD_UpFails Rs.w 1 Upload Fails (Not implemented)
SD_DnKBytes Rs.l 1 KBytes Downloaded
SD_DnFiles Rs.w 1 Files Downloaded
SD_DnFails Rs.w 1 Download Fails (Not implemented)
SD_UsedMins Rs.l 1 Minutes Of Usage
SD_NewUsers Rs.w 1 New Users
SD_Hacks Rs.w 1 Hacks
SD_Drops Rs.w 1 Drop Carriers
SD_Pages Rs.w 1 Pages
SD_RESERVED Rs.b 40 40 CHARS RESERVED FOR ENHANCEMENTS
SD_Len Equ __RS Length
;---------------------------------------------------------------------------;
;- Individual Users in Storage File ----------------------------------------;
;---------------------------------------------------------------------------;
RSReset
SU_Name Rs.b 18 "[-----USER-----] ",0 User name
SU_Location Rs.b 21 "[----LOCATION!----] ",0 Location
SU_Node Rs.b 1 "0" Node #
SU_Usage Rs.b 6 "-:-- ",0 Time online
SU_UpKBytes Rs.b 6 " 0 ",0 Upl KBytes
SU_UpFiles Rs.b 6 " 0 ",0 Upl Files
SU_DnKBytes Rs.b 6 " 0",10,0 Dnl KBytes
SU_DnFiles Rs.b 6 " 0",10,0 Dnl Files
SU_OnTime Rs.b 10 "--:--:-- ",0 Logon Time
SU_OffTime Rs.b 10 "--:--:-- ",0 Logoff Time
SU_AvCPS Rs.b 6 " 0 ",0 Avg CPS
;;;;;;;;;;;;;;; (Average-CPS is NOT IMPLEMENTED)
SU_Baud Rs.b 5 "14400" Baud Rate
SU_Flag_1 Rs.b 1 0 Flag #1
SU_Flag_2 Rs.b 1 0 Flag #2
SU_Flag_3 Rs.b 1 0 Flag #3
SU_Reserved Rs.b 40 40 CHARS RESERVED FOR ENHANCEMENTS
SU_Len Equ __RS Length
;---------------------------------------------------------------------------;
;- Formats of Binary/Boleen Flag bytes in User Structures ------------------;
;---------------------------------------------------------------------------;
;- Flag #1 -----------------------------------------------------------------;
;---------------------------------------------------------------------------;
SU_F1_New Equ 0 New User?
SU_F1_Hack Equ 1 Hacking?
SU_F1_Drop Equ 2 Dropped Carrier?
SU_F1_Page Equ 3 Paged?
SU_F1_SysC Equ 4 Used Sysop Command(s)?
SU_F1_Locl Equ 5 Local Call?
SU_F1_ISDN Equ 6 ISDN Call?
; Equ 7 RESERVED FOR ENHANCEMENTS
;---------------------------------------------------------------------------;
;- Flag #2 -----------------------------------------------------------------;
;---------------------------------------------------------------------------;
SU_F2_Upld Equ 0 Uploaded?
SU_F2_UpFl Equ 1 Failed an Upload?
SU_F2_Dnld Equ 2 Downloaded?
SU_F2_DnFl Equ 3 Failed a Download?
; Equ 4 RESERVED FOR ENHANCEMENTS
; Equ 5 RESERVED FOR ENHANCEMENTS
; Equ 6 RESERVED FOR ENHANCEMENTS
; Equ 7 RESERVED FOR ENHANCEMENTS
;---------------------------------------------------------------------------;
;- Flag #3 -----------------------------------------------------------------;
;---------------------------------------------------------------------------;
; Equ 0 RESERVED FOR ENHANCEMENTS
; Equ 1 RESERVED FOR ENHANCEMENTS
; Equ 2 RESERVED FOR ENHANCEMENTS
; Equ 3 RESERVED FOR ENHANCEMENTS
; Equ 4 RESERVED FOR ENHANCEMENTS
; Equ 5 RESERVED FOR ENHANCEMENTS
; Equ 6 RESERVED FOR ENHANCEMENTS
; Equ 7 RESERVED FOR ENHANCEMENTS
;---------------------------------------------------------------------------;
*****************************************************************************
*****************************************************************************
*****************************************************************************
* So for example, to Point a0 to the Location of the 19th user in the file *
* you load the storage file into memory and put its address into a4 and... *
*****************************************************************************
; Lea SU19_Base+SU_Location(a4),a0
*****************************************************************************
* To see if User 12 was a new caller: *
*****************************************************************************
; BTst #SU_F1_New,SU12_Base+SU_Flag_1(a4)
; Bne.s USER_IS_NEW
*****************************************************************************
* NOTE: Unlike the User-Info and the Daily-Info, the Records are accessed *
* ----- directly. EG to put the Date when there was the most calls into d0 *
*****************************************************************************
; Move.l SR_Calls_D(a4),d0
*****************************************************************************
* NOTE: Do not write new data to the Storage file. That is SAmiLog's job! *
*****************************************************************************